﻿using System;
using System.Collections.Generic;
using NS.Model.Systems;
using NS.BLL.Systems;

public partial class Systems_PowerTree : System.Web.UI.Page
{
    protected void MenuList(string ParentID)
    {
        List<Menu> menuList = MenuService.GetList(ParentID);
        foreach(Menu menu in menuList)
        {
            Response.Write("demo.add(" + menu.MenuID + "," +menu.ParentID + ",\"" +menu.MenuName + "\",\"javascript:void(0)\",null,\"" + menu.MenuID + "\");");
            MenuList(menu.MenuID.ToString());
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Write("var demo = new TreeView();");
        Response.Write("demo.setImagePath(\"../images/\");");
        MenuList("0");
    }
}